package basic.com.liz.learn.design.adpter;

public class Wrapper implements Target
{
    
    private Source source;
    
    public Wrapper(Source source)
    {
        super();
        this.source = source;
    }
    
    @Override
    public void method1()
    {
        source.method1();
    }
    
    @Override
    public void method2()
    {
        System.out.println("接口2");
    }
    
    public static void main(String[] args)
    {
        Source source = new Source();
        Wrapper w = new Wrapper(source);
        w.method1();
        w.method2();
    }
}
